package cn.rkylin.oms.warehouse.stockGoods.vo;

import java.util.ArrayList;
import java.util.List;

import cn.rkylin.oms.warehouse.stockGoods.domain.StockGoods;

/**
 * StockGoodsVO
 *
 * @author zhanghengs
 * @date 2018/01/23
 */
public class StockGoodsVO extends StockGoods {

    /**
     * 序列号
     */
    private static final long serialVersionUID = -4803793928598637807L;


    /**
     * 按钮定义
     */
    private static final String STATUS_ECORDERSHOW = "<span class=\"fadu fa fa-chevron-down\" goodsId=\"%s\"></span>";

    /**
     * searchCondition:快速查询条件.
     */
    private String quickSearch;

    /**
     * orderBy:排序规则.
     */
    private String orderBy;

    /**
     * 可用数
     */
    private Integer available;

    /**
     * 可分派数
     */
    private Integer canallotQty;

    /**
     * 残次品可分派数
     */
    private Integer junkCanallotQty;

    /**
     * 项目Id
     */
    private String prjId;

    /**
     * 单据编码
     */
    private String sourceCode;

    /**
     * 操作标签
     */
    private String tag;

    /**
     * 本地总库存数
     */
    private Integer totalQty;

    /**
     * sonShow:显示详情按钮.
     */
    private String sonShow;

    public String getSonShow() {
        return String.format(STATUS_ECORDERSHOW, this.getGoodsId()).toString();
    }

    public void setSonShow(String sonShow) {
        this.sonShow = sonShow;
    }

    /**
     * idArray：id列表，用于批量操作
     */
    private List<String> idArray = new ArrayList<String>();

    public String getQuickSearch() {
        return quickSearch;
    }

    public void setQuickSearch(String quickSearch) {
        this.quickSearch = quickSearch;
    }

    public String getOrderBy() {
        return orderBy == null ? null : orderBy.replaceAll(".*([';]+|(--)+).*", " ");// 此字段需要防止sql注入
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public Integer getCanallotQty() {
        return canallotQty;
    }

    public void setCanallotQty(Integer canallotQty) {
        this.canallotQty = canallotQty;
    }

    public String getPrjId() {
        return prjId;
    }

    public void setPrjId(String prjId) {
        this.prjId = prjId;
    }

    public String getSourceCode() {
        return sourceCode;
    }

    public void setSourceCode(String sourceCode) {
        this.sourceCode = sourceCode;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public Integer getJunkCanallotQty() {
        return junkCanallotQty;
    }

    public void setJunkCanallotQty(Integer junkCanallotQty) {
        this.junkCanallotQty = junkCanallotQty;
    }

    public Integer getAvailable() {
        return available;
    }

    public void setAvailable(Integer available) {
        this.available = available;
    }

    public List<String> getIdArray() {
        return idArray;
    }

    public void setIdArray(List<String> idArray) {
        this.idArray = idArray;
    }

    public Integer getTotalQty() { return totalQty;}

    public void setTotalQty(Integer totalQty) {this.totalQty = totalQty;}



}
